package com.yuyou.train.lesson.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yuyou.train.service.api.lesson.dto.ExamQuestionDTO;
import com.yuyou.train.service.api.lesson.entity.ResourceExamItem;


@Mapper
public interface ResourceExamItemMapper {
    int deleteByPrimaryKey(String id);

    int insert(ResourceExamItem record);

    ResourceExamItem selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(ResourceExamItem record);
    
    List<ResourceExamItem> findExamItemByQuestionId(String questionId);
    
    List<ResourceExamItem> findExamItemByExamId(String examId);

    List<ExamQuestionDTO> findExamItemWithQuestionByExamId(String examId);

    int findExamItemCountByExamId(String examId);
    
    ResourceExamItem selectExamItem(
    		@Param(value="resourceExamId") String resourceExamId,
    		@Param(value="resourceQuestionId") String resourceQuestionId, 
    		@Param(value="sort") Integer sort);
}